﻿using System;
using System.Collections.Generic;
using System.Security.Principal;

namespace Web7.Core.Security.Users
{
    public class UserAnonymous : IUser
    {
        private readonly string name = "Anonymous";
        private readonly string email = "null@null.com";

        public UserAnonymous()
        {
            //Identity = new UserIdentity(null, false, null);
        }

        //public UserAnonymous(string name, string email)
        //{
        //    Identity = new UserIdentity(null, false, name);
        //    Email = email;
        //}

        public string Email { get{return email;}  }

        //#region IUser Members

        public bool IsAuthenticated { get { return false; } }
        public string UserName { get { return name; } }

        public T Cast<T>() where T : class, IUser
        {
            return null;
        }

        //public bool IsInUserGroup(string userGroupName)
        //{
        //    return false;
        //}
        //public bool HasPermission(string permissionName)
        //{
        //    return false;
        //}
        //public bool HasPermission(Guid permissionID)
        //{
        //    return false;
        //}
        //#endregion

        //#region IPrincipal Members

        //public IIdentity Identity { get; private set; }

        //public bool IsInRole(string role)
        //{
        //    return false;
        //}
        //#endregion
    }
}